package com.ccnu.sb.controller;

import com.ccnu.sb.health.RHealthStatus;
import jakarta.servlet.http.HttpServletRequest;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/health")
public class HealthController {
    private static Logger log = LogManager.getLogger();

    @RequestMapping("/check")
    public RHealthStatus check(HttpServletRequest req) {
        RHealthStatus rhs = new RHealthStatus();
        rhs.setCpu("80%");
        rhs.setTemp("80°");
        rhs.setHard("1TB");
        return rhs;
    }
}
